app.service('z-salaryApprovalRule-s', [
    '$rootScope',
    '$z-http',
    'ZModel',
    function ($rootScope, $http, ZModel) {
        var service = {
            getSalaryApprovalRuleList: function (data, success, fault) {
                $http.post("salaryApprovalRule/getSalaryApprovalRuleList.do",
                    $.param(data),
                    {headers: {'Content-Type': 'application/json'}}
                ).success(function (data) {
                    success(data.success);
                }).error(function (data) {
                    fault(data);
                });
            },
            saveSalaryRule: function (data, success, fault) {
                $http.post("salaryApprovalRule/saveSalaryRule.do", data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            updateSalaryRule: function (data, success, fault) {
                $http.post("salaryApprovalRule/updateSalaryRule.do", data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            deleteSalaryRule: function (data, success, fault) {
                $http.post("salaryApprovalRule/deleteSalaryRule.do",
                    $.param(data),
                    {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
                ).success(function (data) {
                    success(data.success);
                }).error(function (data) {
                    fault(data);
                });
            },
        };
        return service;
    }]);